
import { game } from "../../../script/game/control/game";
import cardClass from "../../../script/game/model/cardModel";
import { mapClass } from "../../../script/game/model/mapModel";
import { playerClass } from "../../../script/game/model/playerModel";
import skillModel from "../../../script/game/model/skill";
import { timeClass } from "../../../script/game/model/timeModel";
import { gameService } from "../../../script/util/gameService";
import { ccs } from "../../../script/util/services";
import { WinBase } from "../../../script/wins/WinBase";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends WinBase {
    @property(cc.AudioClip)
    music: cc.AudioClip = null;
    start () {
        
        // cc.debug.setDisplayStats(false);
        // ccs.netMgr._init();
        // ccs.netMgr._callCloud("test",{action: "", params: {a: 1}}, res => {
        //     console.log(res);
        // })
        // this.scheduleOnce(() => {
        //     ccs.netMgr._callCloud("rank", {
        //         action: "getRank",
        //         params: {}
        //     },
        //     (res) => {
        //     }
        //     )
        // }, 1);
        //初始化广告
        ccs.AD._init();
        ccs.dataMgr.initJson();
        // ccs.prefabMgr.initPrefab();
        ccs.winMgr.showWin("gameStartWin");
        cc.audioEngine.playMusic(this.music, true);
        game.gameMgr.music = this.music;
        // ccs.resMgr.loadRes<cc.AudioClip>("bg", cc.AudioClip).then(res => {
            
        // })
        
    }
    
}
